// pages/location/index.js
Page({
  data: {
    isAppear: false,
    array: ['西区', '东区', '教学区', '运动场', '南亭', '全部'],
    tabIndex: 0,
    arrayIndex: 0
  },

  // 出现弹窗
  appearWindow (e) {
    const { area } = e.currentTarget.dataset
    this.setData ({
      isAppear: true,
      arrayIndex: area
    })
  },

  // 关闭弹窗
  closeWindow () {
    this.setData ({
      isAppear: false
    })
  },

  // 改变Tabs栏选项
  changeTabs (e) {
    const { index } = e.currentTarget.dataset
    this.setData ({
      tabIndex: index,
    })
  }
})